package com.jingtai.core.entity.merchants;


import com.baomidou.mybatisplus.annotation.TableName;
import com.jingtai.core.entity.BaseEntity;
import com.jingtai.validate.swagger.CApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

import io.swagger.annotations.*;

import java.math.BigDecimal;

import java.util.Date;

/**
 * 商品订单总表（用户对商户）
 * 
 * @author sunlaiqian
 * @date 2020-12-02 15:08:11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("shop_merchants_to_member_order")
@ApiModel(value = "商品订单总表（用户对商户）", description = "商品订单总表（用户对商户）")
public class MerchantsToMemberOrder  extends BaseEntity implements Serializable {

	/**
	 * 商户ID
	 */
	@CApiModelProperty(value = "商户ID",required = true,cNotEmpty = true)
	private Long merchantsId;

	/**
	 * 用户ID
	 */
	@CApiModelProperty(value = "用户ID",required = true,cNotEmpty = true)
	private Long memberId;

	/**
	 * 用户收货地址ID
	 */
	@CApiModelProperty(value = "用户收货地址ID",required = true,cNotEmpty = true)
	private Long memberAddressId;

	/**
	 * 订单总编号
	 */
	@CApiModelProperty(value = "订单总编号",required = true,cNotEmpty = true)
	private String orderTotalCode;

	/**
	 * 商品总价
	 */
	@CApiModelProperty(value = "商品总价",required = true,cNotEmpty = true)
	private BigDecimal goodsTotalPrice;

	/**
	 * 运费
	 */
	@CApiModelProperty(value = "运费",required = true,cNotEmpty = true)
	private BigDecimal freight;

	/**
	 * 优惠价
	 */
	@CApiModelProperty(value = "优惠价",required = true,cNotEmpty = true)
	private BigDecimal preferentialPrice;

	/**
	 * 用户实付价格
	 */
	@CApiModelProperty(value = "用户实付价格",required = true,cNotEmpty = true)
	private BigDecimal memberRealPay;

	/**
	 * 支付方式 0：微信1：支付宝
	 */
	@CApiModelProperty(value = "支付方式 0：微信1：支付宝",required = true,cNotEmpty = true)
	private Integer payType;

	/**
	 * 支付时间
	 */
	@CApiModelProperty(value = "支付时间",required = true,cNotEmpty = true)
	private Date payTime;

	/**
	 * 支付流水号
	 */
	@CApiModelProperty(value = "支付流水号",required = true,cNotEmpty = true)
	private String payRunningCode;

	/**
	 * 支付状态 10待支付,20 支付完成,30支付失败
	 */
	@CApiModelProperty(value = "支付状态 10待支付,20 支付完成,30支付失败",required = true,cNotEmpty = true)
	private Integer payState;

	/**
	 * 退款状态 0:未发起退款  10：申请退款  20：退款中  30：退款完成  40：退款失败
	 */
	@CApiModelProperty(value = "退款状态 0:未发起退款  10：申请退款  20：退款中  30：退款完成  40：退款失败",required = true,cNotEmpty = true)
	private Integer refundState;

	/**
	 * 订单状态 10.待支付 20.待发货 30.已发货 40.待评价 50.已完成60.已取消70无效订单
	 */
	@CApiModelProperty(value = "订单状态 10.待支付 20.待发货 30.已发货 40.待评价 50.已完成60.已取消70无效订单",required = true,cNotEmpty = true)
	private Integer orderState;

	/**
	 * 取消原因
	 */
	@CApiModelProperty(value = "取消原因",required = true,cNotEmpty = true)
	private String cancelWhy;

	/**
	 * 确认收货时间
	 */
	@CApiModelProperty(value = "确认收货时间",required = true,cNotEmpty = true)
	private Date sureGoodsTime;

	/**
	 * 平台抽成
	 */
	@CApiModelProperty(value = "平台抽成",required = true,cNotEmpty = true)
	private BigDecimal platformProportion;

	/**
	 * 供应商抽成
	 */
	@CApiModelProperty(value = "供应商抽成",required = true,cNotEmpty = true)
	private BigDecimal supplyProportion;


}
